package cn.com.godliu.rabbitmqprovider.service;

import cn.com.godliu.rabbitmqprovider.common.DateUtil;
import org.springframework.amqp.core.ReturnedMessage;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

@Service
public class MsgProducter implements RabbitTemplate.ReturnsCallback {

    @Autowired
    RabbitTemplate rabbitTemplate;

    public void sendMsg(String exchange, String routingKey, Object object) {
        rabbitTemplate.convertAndSend(exchange, routingKey, object);
    }

    @Override
    public void returnedMessage(ReturnedMessage returnedMessage) {

    }
}
